<script>
	import Vue from 'vue'
	import {router,RouterMount} from '@/common/js/router.js'  //路径换成自己的
	export default {
		onLaunch: function() {
			// console.warn('当前组件仅支持 uni_modules 目录结构 ，请升级 HBuilderX 到 3.1.0 版本以上！')
			uni.getSystemInfo({
				success:function(e){
					// 状态栏的高度
					Vue.prototype.statusBar = e.statusBarHeight
					
					// 状态栏 + 胶囊的高度
					if(e.platform == 'android') {
						Vue.prototype.customBar = e.statusBarHeight + 50
					} else if(e.platform == 'ios') {
						Vue.prototype.customBar = e.statusBarHeight + 45
					}
					
					// #ifdef MP-WEIXIN
					let custom = wx.getMenuButtonBoundingClientRect()
					Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
					Vue.prototype.group = 'wxapp'
					// #endif
					
					// #ifdef H5
					Vue.prototype.group = 'wechat'
					// #endif
				}
			})
		},
		onShow: function() {
			// #ifdef MP-WEIXIN
			if (router.$lockStatus === false) {
				router.forceGuardEach()
			}
			// #endif
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="less">
	/* 每个页面公共css */
	@import '@/common/css/common.less';
	
	/* H5隐藏头部 */
	/* #ifdef H5 */
	uni-page-head {display: none;}
	uni-page-head[uni-page-head-type=default]~uni-page-wrapper{height: calc(100% - constant(safe-area-inset-top));height: calc(100% - env(safe-area-inset-top));}
	/* #endif */
	
	/* 详情界面的uni-collapse */
	.hotel-detail{
		.uni-collapse-cell__title{ padding-right: 27rpx; position: relative;}
		.uni-collapse-cell__title-arrow{
			font-weight: bolder;position: absolute;right: 27rpx;
			bottom: 54rpx;
			/* #ifdef H5 */
			bottom: 44rpx;
			/* #endif */
		}
		.uni-collapse-cell__title-arrow-active { 
			bottom: 35rpx;
			/* #ifdef H5 */
			bottom: 44rpx;
			/* #endif */
		}
	}
	
	/* 下订单界面的默认组件样式 */
	.book-hotel{
		.book-detail{
			.item{
				/* uni-number-box */
				.uni-numbox{width: 176rpx;height: 56rpx;line-height: 54rpx;}
				.uni-numbox__value {width: 82rpx;height: 56rpx;line-height: 52rpx;font-size: 28rpx;border: 2rpx solid #dcdcdc;}
				.uni-numbox__minus,.uni-numbox__plus {width: 46rpx;height: 56rpx;line-height: 52rpx; background-color: #fff;border: 2rpx solid #dcdcdc;}
				.uni-numbox__minus {border-right: none;border-radius: 10rpx 0 0 10rpx;}
				.uni-numbox__plus {border-left: none;border-radius: 0 10rpx 10rpx 0;}
				.uni-numbox--text {font-size: 20px;color: #bfbfbf;line-height: 52rpx;}
				
				/* uni-data-checklist */
				.uni-data-checklist {
					.checklist-group {
						.checklist-box {
							margin: 0 calc(10rpx + 10px) 0 30rpx;
							.checklist-content {
								.checklist-text {font-size: 26rpx;line-height: 26rpx;}
							}
							.radio__inner {
								width: 25rpx;height: 25rpx;
								.radio__inner-icon {width: 12rpx;height: 12rpx;}
							}
						}
					}
				}
			}
		}
	}
	
	/* 优惠券列表，HMfilterDropdown的样式修改 */
	.coupon-filter{
		.HMfilterDropdown{
			.nav{ height: 80rpx; padding-left: 0; }
			.sub-menu-class {
				&.show { transform: translate3d(0, 80rpx, 0); }
			}
		}
	}
	
	/* 团详情界面的默认组件样式 */
	.group-detail{
		.banner{
			// uni-swiper-dot的样式修改
			.uni-swiper__warp{
				.uni-swiper__dots-nav{
					justify-content: flex-end;
					.uni-swiper__dots-nav-item{
						display: inline-block;width: 54rpx;height: 30rpx;font-size: 20rpx;text-align: center;line-height: 30rpx;letter-spacing: 4rpx;text-indent: 4rpx; background: url(https://static.newbeaconhotels.com/app/hotel/group/swiper-dot.png) no-repeat;background-size: 100%;
					}
				}
			}
		}
		.info1{
			.right{
				.group-countdown{
					.uni-countdown__splitor{font-size: 22rpx;line-height: 32rpx;}
					.uni-countdown__number{width: 32rpx;height: 32rpx;line-height: 32rpx;font-size: 22rpx;border-radius: 6rpx;}
				}
			}
		}
	}
	.specification{
		/* uni-number-box */
		.part3{
			.uni-numbox{width: 200rpx;height: 46rpx;line-height: 46rpx;}
			.uni-numbox__value {width: 60rpx;height: 46rpx;font-size: 28rpx;background-color: #f5f5f5;border: none;border-radius: 6rpx;}
			.uni-numbox__minus,.uni-numbox__plus {width: 80rpx;height: 46rpx;background-color: #fff;border: none;}
			.uni-numbox__minus {border-right: none;color: #b1b1b1;}
			.uni-numbox__plus {border-left: none;color: #333333;}
			.uni-numbox--text {font-size: 40rpx;}
		}
	}
	
	/* 团订单的uni-countdown */
	.hotel-orders{
		.order-list{
			.item{
				.part1{
					.group-countdown{
						.uni-countdown__splitor{font-size: 22rpx;line-height: 32rpx;}
						.uni-countdown__number{width: 32rpx;height: 32rpx;line-height: 32rpx;font-size: 22rpx;margin: 5rpx 0;}
					}
				}
			}
		}
	}
	
	/* 团进度页面的默认组件样式 */
	.group-progress{
		.group-countdown{
			.uni-countdown{padding: 0;}
			.uni-countdown__splitor{font-size: 22rpx;height: 32rpx;line-height: 32rpx;padding: 0;}
			.uni-countdown__number{width: 32rpx;height: 32rpx;line-height: 32rpx;font-size: 22rpx;border-radius: 6rpx;margin: 0 4rpx;}
		}
	}
	
	/* 累计纽扣币uni-collapse */
	.page-total{
		.needknow {
			.uni-collapse-cell{border: none;}
			.uni-collapse-cell__title-text{font-size: 30rpx;}
		}
	}
	
	/* 酒店评价列表的uni-data-checkbox */
	.hotel-comments{
		.part2{
			.uni-data-checklist .checklist-group .checklist-box.is--tag{padding: 6rpx 12rpx;}
			.uni-data-checklist .checklist-group .checklist-box .checklist-content .checklist-text{font-size: 24rpx;}
			.uni-data-checklist .checklist-group .checklist-box.is--tag.is-disable{opacity: 1;}
		}
	}
	
	/* 酒店评价 */
	.opinion{
		.opinion_rate{
			.rate{
				.uni-rate__icon{
					.uni-icons{margin-right: 10rpx;}
				}
			}
		}
	}
	
	/* 积分订单的uni-countdown */
	.order-list {
		.list_box {
			.item {
				.part3{
					.uni-countdown{padding-left: 10rpx;}
					.uni-countdown__number{background: none;width: 20rpx;font-size: 22rpx;}
				}
			}
		}
	}
	
	/* 签到页面的uni-calendar */
	.page-sign{
		.sign{
			.uni-calendar__header{border-bottom: none;height: 68rpx;}
			.uni-calendar__header-btn-box{height: 68rpx;}
			.uni-calendar__backtoday{top: 9rpx;}
			.uni-calendar__weeks-day{border-bottom: none;}
			.uni-calendar__header-text,
			.uni-calendar__weeks-day-text{font-size: 28rpx;line-height: 30rpx;}
			.uni-calendar-item__weeks-box-item{width: 100rpx; height: 80rpx;}
			.uni-calendar-item__weeks-box-circle{width: 10rpx;height: 10rpx;border-radius: 50%; right: 20rpx;top: 8rpx;}
			.uni-calendar-item__weeks-box-text{font-size: 28rpx;}
			.uni-calendar-item--extra{font-size: 20rpx;}
			.uni-calendar-item--isDay-text{color: #03004c;}
			.uni-calendar-item--isDay, .uni-calendar-item--checked{
				background-color: #03004c;opacity: 1;
				.uni-calendar-item--isDay-text{color: #fff;}
			}
			.uni-calendar__header-btn{width: 14rpx;height: 20rpx;border: none;background-position: center center;background-repeat: no-repeat;background-size: cover;}
			.uni-calendar--left{background-image: url(https://static.newbeaconhotels.com/app/hotel/integral/l-m.png);transform: none;}
			.uni-calendar--right{background-image: url(https://static.newbeaconhotels.com/app/hotel/integral/r-m.png);transform: none;}
		}
	}
</style>
